<?php

class StatusController extends Controller
{
	public function actionIndex()
	{
		$user_id = Yii::app()->user->id;
		$user_status =  UserStatus::model()->findByPk($user_id);

		if(isset($_POST['UserStatus'])){
			$user_status->attributes = $_POST['UserStatus'];
			if($user_status->save()){
				
			}
		}
		$this->render('index',array('user_status'=>$user_status));
		
	}
	

}